namespace CSharpPro._1030;

public class Demo4
{
    private int id; // 字段 feild

    // 属性 property
    public int Id
    {
        get => id;
        set => id = value;
    }

    public void TestPrint()
    {
        //Father father = new Father();
        // father.Print();
        Child child = new Child();
        child.Print();
        Console.WriteLine("=============");
        // 编译看左，执行看右
        Father f1 = new Child();
        f1.Print();
        Father f2 = new Son();
        f2.Print();

        // UserService userService = new UserServiceImpl();
        // userService.AddUser(new Student());

        // Convert.ToInt16()
    }

    public int Add(int a, int b)
    {
        return a + b;
    }
}